<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Register.ascx.cs" Inherits="Controls.UserCP.Register" %>
<asp:MultiView ID="mviewRegister" runat="server">
    <asp:View ID="viewRegister" runat="server">
        <table width="100%" border="0">
            <tr>
                <td align="left" valign="top" width="50%">
                    <p>
                        Username:
                        <asp:TextBox runat="server" ID="txtUsername"
                            MaxLength="25" />
                        <asp:CustomValidator ID="customUsername" runat="server" ErrorMessage="Username is already taken."
                            ValidationGroup="AddUser" Display="None" EnableClientScript="False" ControlToValidate="txtUsername" OnServerValidate="customUsername_ServerValidate"></asp:CustomValidator>
                        <asp:RequiredFieldValidator ID="requiredUsername" runat="server" Display="None" EnableClientScript="False"
                            ErrorMessage="Username is a required field." ValidationGroup="AddUser"></asp:RequiredFieldValidator></p>
                    <p>
                        Password:
                        <asp:TextBox runat="server" ID="txtPassword"
                            TextMode="password" />
                        <asp:RequiredFieldValidator ID="requiredPassword" runat="server" ControlToValidate="txtPassword"
                            Display="None" ErrorMessage="Password is the required field." ValidationGroup="AddUser" EnableClientScript="False"></asp:RequiredFieldValidator>
                    </p>
                    <p>
                        What is the sound a cat makes? (hint: rhymes with "cow"):<br />
                        <asp:TextBox runat="server" ID="txtTuring" />
                        <asp:RegularExpressionValidator ID="regexTuring" runat="server" Display="None"
                            EnableClientScript="False" ErrorMessage='Just type the word "meow" to pass the Turing test, idiot.' ValidationGroup="AddUser" ControlToValidate="txtTuring" ValidationExpression="meow"></asp:RegularExpressionValidator>
                    </p>
                    <p>
                        <asp:Button runat="server" ID="btnRegister"
                            Text="Register" OnClick="btnRegister_Click" ValidationGroup="AddUser" />
                    </p>
                </td>
                <td align="left" valign="top">
                    <asp:ValidationSummary ID="summaryRegister" runat="server" ValidationGroup="AddUser" />
                    
                </td>
            </tr>
        </table>
    </asp:View>
    <asp:View ID="viewWelcome" runat="server">
        <p>
            Welcome to the Ultimate Awesome community,
            <asp:Label runat="server" ID="lblUsername" />.
        </p>
    </asp:View>
    <asp:View ID="viewError" runat="server">
        <p>You're already signed into your Ultimate Awesome account.</p>
    </asp:View>
</asp:MultiView>
